//
//  AppDelegate.m
//  IdeaShare_Mac_Demo
//
//  Created by IdeaShare on 2021/1/8.
//

#import "AppDelegate.h"
#import <IdeaShare_SDK/IdeaShareServiceController.h>
@interface AppDelegate ()

@end

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    // Insert code here to initialize your application
}


- (void)applicationWillTerminate:(NSNotification *)aNotification {
    // Insert code here to tear down your application
    IdeaShareServiceController *dShareServiceController = [IdeaShareServiceController shareInstance];
//    SharePolicy *dSharePolicy = [[SharePolicy alloc]init];
//    dSharePolicy.isShareAudio = NO;
//    dSharePolicy.shareQuality = 1;
//    [dShareServiceController stopSharing:^(id t) {
//    }];
//    [dShareServiceController setPolicy:dSharePolicy];
//    [dShareServiceController disconnect:^(id t) {
//    }];
    [dShareServiceController destroy];
}

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
{
    return YES;
}

@end
